<template>
  <base-page title="测试文章" :comment-data="tableData">
    <template #header>
      <header>
        <h1 class="title">测试标题</h1>
        <aside class="icon-group">
          <a>曾小晨</a>
          <span class="separator">/</span>
          <a>2020-02-24</a>
          <span class="separator">/</span>
          <a>IT</a>
          <span class="separator">/</span>
          <a>0 阅读</a>
          <span class="separator">/</span>
          <a>0 评论</a>
        </aside>
      </header>
    </template>
    <!-- 内容 -->
    <main class="page-content" v-highlight>
      <h2>简介</h2>
      <p>
        创建 Date 实例用来处理日期和时间。<code>Date</code>
        对象基于1970年1月1日（世界标准时间）起的毫秒数。
      </p>
      <div class="code-box-demo">
        <pre>
public class Person {
      private Integer il;
}</pre
        >
      </div>
      <br />
      <img src="../../assets/test/2.png" />
    </main>
    <!-- 版权声明 -->
    <aside class="other">
      <div class="left fl">
        最后修改时间：2018-05-03
      </div>
      <el-tooltip
        class="item"
        effect="dark"
        content="不可以侵权的哈"
        placement="top"
      >
        <div class="right fr">
          <i class="el-icon-warning"></i> 未经作者允许禁止转载
        </div>
      </el-tooltip>
    </aside>
    <!-- 打赏 -->
    <div class="footer mgb15">
      <el-button type="warning" round icon="iconfont iconfont-i-money">
        我要打赏
      </el-button>
    </div>
  </base-page>
</template>

<script>
import BasePage from "@/components/BasePage";
export default {
  components: {
    BasePage
  },
  data() {
    return {
      tableData: [
        {
          id: 1,
          img: "https://q.qlogo.cn/g?b=qq&nk=704729872&s=40",
          username: "曾小晨",
          content:
            "月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美" +
            "月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮" +
            "很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美月亮很美" +
            "月亮很美月亮很美月亮很美月亮很美",
          time: Date.now(),
          children: [
            {
              id: 2,
              parentId: 1, // 回复的父级ID
              brotherId: null, // 回复的兄弟ID
              replyUserName: "隔壁泰山",
              img: "https://q.qlogo.cn/g?b=qq&nk=704729872&s=40",
              username: "曾小晨",
              content: "哪里美....",
              time: Date.now()
            }
          ]
        },
        {
          id: 1,
          img: "https://q.qlogo.cn/g?b=qq&nk=704729872&s=40",
          username: "曾小晨",
          content: "路过",
          time: Date.now(),
          children: []
        }
      ]
    };
  }
};
</script>

<style lang="scss" scoped>
@import "../../styles/config";

.code-box-demo {
  position: relative;
  border-top: 2em solid rgba(230, 230, 230, 0.7);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0.1em 0.5em 0 rgba(0, 0, 0, 0.28);
  &::before {
    position: absolute;
    top: -1.25em;
    left: 1em;
    display: block;
    width: 0.5em;
    height: 0.5em;
    background-color: #f44;
    border-radius: 50%;
    -webkit-box-shadow: 0 0 0 2px #f44, 1.5em 0 0 2px #9b3, 3em 0 0 2px #fb5;
    box-shadow: 0 0 0 2px #f44, 1.5em 0 0 2px #9b3, 3em 0 0 2px #fb5;
    content: "";
  }
  &::after {
    position: absolute;
    top: -1.6em;
    left: 5.5em;
    display: block;
    width: calc(100% - 6em);
    height: 1.2em;
    background-color: white;
    border-radius: 2px;
    content: "";
  }
}

#detail {
  padding: 5px;
}
.warn {
  display: block;
  font-size: 12px;
  color: #d2691e;
}

h2,
h3,
h4,
h5 {
  font-weight: 600;
  margin: 10px 0;
}

.left,
.right {
  font-size: 12px;
  color: #9fa0a4;
}

.other {
  overflow: auto;
}

.footer {
  text-align: center;
}

.title {
  font-size: 20px;
  font-weight: 600;
  /*margin-bottom: 10px;*/
}
.page-content {
  border-bottom: 1px solid #f2f2f2;
}
.icon-group {
  border-bottom: 1px solid #f2f2f2;
  color: #888;
  a,
  span {
    font-size: 11px;
  }
}
/deep/ .el-button span {
  vertical-align: middle;
}

header {
  text-align: center;
  margin-bottom: 10px;
}
</style>
